var mongoose = require('mongoose');
var materializeP = require('mongoose-materialized');
var Schema = mongoose.Schema;

// 定义一个普通的数据模型
var NewsSchema = new Schema({
    title:String,
    author:String,
    viceTitle: String,
    content: String,
    text:String,
    date:{type:Date,default: Date.now },
    parentId:String

});
// 将数据模型应用分页插件
NewsSchema.plugin(materializeP);

module.exports = mongoose.model('News', NewsSchema,'news');